package com.business.model.pessoa;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

import org.hibernate.envers.Audited;

/**
 * @author Rodrigo
 * @version 1.0
 * @created 08-fev-2015 19:12:11
 */
@Audited
@Entity
public class DocInscricaoMunicipal implements Serializable {

	private static final long serialVersionUID = 7454843957965650680L;

	@Id
	@OneToOne
	@JoinColumn(name="IdDocumento")
	private DocumentoPessoa Documento;
	
	@Column(length = 20)
	private String Numero;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="IdSituacao")
    private Situacao Situacao;
	
	@Column
	private Date DataEmissao;

	public DocInscricaoMunicipal(){

	}

	public void finalize() throws Throwable {

	}

	public DocumentoPessoa getDocumento(){
		return Documento;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setDocumento(DocumentoPessoa newVal){
		Documento = newVal;
	}

	public String getNumero(){
		return Numero;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setNumero(String newVal){
		Numero = newVal;
	}

	public Situacao getSituacao(){
		return Situacao;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setSituacao(Situacao newVal){
		Situacao = newVal;
	}

	public Date getDataEmissao(){
		return DataEmissao;
	}

	/**
	 * 
	 * @param newVal
	 */
	public void setDataEmissao(Date newVal){
		DataEmissao = newVal;
	}

}